home *** CD-ROM | disk | FTP | other *** search
- Listing 4 - Additions to the Main CIPS Program
-
- (from file cips.c)
-
-
-
- case 8: /* perform edge detection */
- printf("\nCIPS> Enter input image name\n");
- get_image_name(name);
- printf("\nCIPS> Enter output image name\n");
- get_image_name(name2);
- get_parameters(&il, &ie, &ll, &le);
- get_edge_options(&detect_type, &detect_threshold,
- &high);
- if(detect_type == 4)
- quick_edge(name, name2, the_image, out_image,
- il, ie, ll, le, detect_threshold,
- high);
- else
- detect_edges(name, name2, the_image, out_image,
- il, ie, ll, le, detect_type,
- detect_threshold, high);
- break;
-
-
-
-
-
- show_menu()
- {
-
- printf("\n\n\nWelcome to CIPS");
- printf("\nThe C Image Processing System");
- printf("\nThese are you choices:\n");
- printf("\n\t1. Display image header");
- printf("\n\t2. Show image numbers");
- printf("\n\t3. Print image numbers");
- printf("\n\t4. Display image (VGA & EGA only)");
- printf("\n\t5. Display or print image using halftoning");
- printf("\n\t6. Print graphics image using dithering");
- printf("\n\t7. Print or display histogram numbers");
- printf("\n\t8. Perform edge detection");
- printf("\n\t20. Exit system");
- printf("\n\nEnter choice _\b");
-
- } /* ends show_menu */